.control {
  margin-bottom: 20px;
}

.control__label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;

  &.control__label--small {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
  }
}

.control__label-icon {
  margin-right: 6px;
}

.control__description {
  font-size: 13px;
  line-height: 160%;
  color: $color-neutral-600;
  margin-bottom: 16px;
}

.control__context {
  color: $color-primary-900;
  margin-left: 6px;

  &:hover {
    text-decoration: none;
    color: $color-neutral-500;
  }
}

.input {
  appearance: none;
  display: block;
  width: 100%;
  border: 1px solid $color-neutral-400;
  border-radius: 3px;
  padding: 8px 12px;
  outline: none;

  &:active,
  &:focus {
    border-color: $color-primary-500;
  }

  &.input--large {
    padding: 12px 12px;
  }

  &.input--error {
    border-color: $color-error-500;
  }
}

.textarea--modal {
  resize: vertical;
  height: 22px * 6;
  line-height: 22px;
  font-size: 13px;
}

.input__with-icon {
  position: relative;

  .input {
    padding-right: 32px;
  }

  i {
    position: absolute;
    right: 12px;
    top: 50%;
    font-size: 12px;
    line-height: 12px;
    margin-top: -6px;
    color: $color-neutral-300;
  }
}

.checkbox {
  position: relative;
  height: 28px;
  line-height: 28px;
  padding-left: 18px;
  cursor: pointer;
  user-select: none;

  &.checkbox--has-content {
    padding-left: 24px;
  }

  &::before {
    @include absolute(5px, auto, 0, 0);

    content: "";
    font-family: $font-awesome-font-family;
    font-weight: $font-awesome-font-weight;
    border: 1px solid $color-neutral-400;
    border-radius: 3px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background-color: $white;
    color: $color-success-600;
  }

  &.active::before {
    content: fa-content($fa-var-check);
  }
}

.switch {
  position: relative;
  line-height: 28px;
  height: 28px;
  padding-left: 22px;
  cursor: pointer;
  user-select: none;

  &.switch--static {
    cursor: initial;
    user-select: initial;
  }

  &.switch--has-content {
    padding-left: 28px;
  }

  &::before {
    content: "";
    border-radius: 12px;
    width: 22px;
    height: 12px;
    background-color: $color-neutral-200;

    @include absolute(9px, auto, auto, 0);
  }

  &::after {
    content: "";
    border-radius: 100%;
    width: 6px;
    height: 6px;
    background-color: $white;
    transition: left 0.085s ease-in;

    @include absolute(12px, auto, auto, 4px);
  }

  &.active {
    &::before {
      background-color: $color-success-500;
    }

    &::after {
      left: 12px;
    }
  }

  &.unknown {
    &::before {
      background-color: $color-warning-500;
    }

    &::after {
      left: 8px;
    }
  }

  &.switch--large {
    padding-left: 28px;

    &.switch--has-content {
      padding-left: 36px;
    }

    &::before {
      top: 6px;
      height: 16px;
      width: 28px;
    }

    &::after {
      top: 10px;
      width: 7px;
      height: 7px;
    }

    &.active::after {
      left: 17px;
    }

    &.unknown::after {
      left: 10.5px;
    }
  }
}

.switch__icon {
  margin-right: 4px;
  color: $color-neutral-600;
}

.error {
  margin-top: 6px;
  color: $color-error-500;
}

.actions {
  @extend %first-last-no-margin;

  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0;

  > div {
    width: 100%;
  }

  &.actions--right {
    justify-content: right;
  }
}

.action__links {
  list-style: none;
  margin: 0;
  padding: 0;

  li {
    display: inline;
    margin-right: 20px;
    white-space: nowrap;

    &:last-child {
      margin-right: 0;
    }
  }
}
